package com.glory.hikvisionmobile.adapter;


import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.hikvisionmobile.R;
import com.glory.hikvisionmobile.bean.DataCollect.XEdcItemSetLinesBean;
import com.pda.platform.ui.ui_pdaplatform.utils_public.FreeApi_StringUtils;

import java.util.List;

public class DataCollectListAdapter extends BaseQuickAdapter<XEdcItemSetLinesBean, BaseViewHolder> {

    public DataCollectListAdapter(@Nullable List<XEdcItemSetLinesBean> data) {
        super(R.layout.adapter_data_collect_list,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, XEdcItemSetLinesBean item) {
        if (FreeApi_StringUtils.isEmpty(item.getEdcItemLineDesc())){
            helper.setText(R.id.tvTitle, item.getEdcItemLineName());
        }else {
            helper.setText(R.id.tvTitle, item.getEdcItemLineDesc());
        }

    }

}
